package com.leyou.item.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.leyou.common.dto.PageDTO;
import com.leyou.item.dto.SpecGroupDTO;
import com.leyou.item.dto.SpecParamDTO;
import com.leyou.item.dto.SpuDTO;
import com.leyou.item.entity.Spu;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface SpuService extends IService<Spu> {
    PageDTO<SpuDTO> pageQuery(@Param("page") Integer page, @Param("rows") Integer rows, @Param("brandId") Long brandId, @Param("categoryId") Long categoryId, @Param("id") Long id, @Param("saleable") Boolean saleable);

    List<SpecParamDTO> listSpecByspuId(@Param("spuId") Long spuId, @Param("searching") Boolean searching);

    void addGoods(SpuDTO spuDTO);

    void updateSaleable(@Param("id") Long id, @Param("saleable") Boolean saleable);

    SpuDTO queryGoodsById(@Param("id") Long id);

    void updateSpu(SpuDTO spuDTO);

    SpuDTO querySpuByid(@Param("id") Long id);
}
